<div class="portlet" ng-if="!isDetail">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
     <select class="form-control search-item search-item" ng-model="payRollYear" 
          			 ng-options="opt.payrollYear as opt.payrollYear for opt in salaryPayRollYearList">
     			<option value=""  disabled selected hidden>-- 年 --</option>
        </select>
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="grid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="grid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'salaryPayRoll/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: 'payrollYear'">年</th>
                <th data-options="field: 'payrollMonth'">月</th>
                <th data-options="field: 'status | code : payrollstatus'">状态</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: '工资单', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
			<div class="form-group">
				<label class="col-md-4 control-label">年</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="payrollYear" ng-model="salaryPayRoll.payrollYear" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-4 control-label">月</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="payrollMonth" ng-model="salaryPayRoll.payrollMonth" required>
				</div>
			</div>
			<!-- <div class="form-group">
				<label class="col-md-4 control-label">状态</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="status" ng-model="salaryPayRoll.status" required>
				</div>
			</div> -->
			<div class="form-group">
				<label class="col-md-4 control-label">备注</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="remark" ng-model="salaryPayRoll.remark" required>
				</div>
			</div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" ng-click="grid.save();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>




<div class="portlet" ng-if="isDetail">
    <div class="portlet-actions">
       <!-- <button class="btn blue btn-sm" ng-click="grid.add()"> 新增</button> -->
      <button class="btn blue btn-sm" ng-click="detailGrid.goBack()"><i class="fa fa-arrow-circle-left"></i> 返回</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
    <input type="text" class="form-control search-item" ng-model="empName" placeholder="员工姓名">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="detailGrid.query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="detailGrid.reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="detailGrid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'salaryPayRollDetail/query.do?payRollYear={{payRollYear}}&payRollMonth={{payRollMonth}}', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: 'salaryDate'">工资月</th>
                <th data-options="field: 'empName'">员工姓名</th>
                <th data-options="field: 'deptName'">所属部门名称</th>
                <th data-options="field: 'baseSalary'">基本工资(￥)</th>
                <th data-options="field: 'workingAgeSubsidy'">工龄补贴(￥)</th>
                <th data-options="field: 'positionSalary'">岗位工资(￥)</th>
                <th data-options="field: 'attendance'">考勤(￥)</th>
                <th data-options="field: 'socialSecurity'">社保(￥)</th>
                <th data-options="field: 'payableSalary'">应发工资(￥)</th>
                <th data-options="field: 'deduction'">提成(￥)</th>
                <th data-options="field: 'attendanceDeductions'">考勤扣款(￥)</th>
                <th data-options="field: 'tax'">所得税(￥)</th>
                <th data-options="field: 'paidSalary'">实发工资(￥)</th>
               <!--  <th data-options="field: 'quotaJson'">工资定额参数</th> -->
                <th data-options="field: 'status'">状态</th>
               <!--  <th data-options="field: 'remark'">备注</th> -->
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="detailModal" data-options="title: '员工工资明细', static: true, width: 1120, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
			<div class="form-group">
				<label class="col-md-2 control-label">员工编号</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.empId}}
				</div>
				<label class="col-md-2 control-label">员工姓名</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.empName}}
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">所属部门名称</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.deptName}}
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">基本工资</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.baseSalary}}
				</div>
				<label class="col-md-2 control-label">工龄补贴</label>
				<div class="col-md-2" style="padding-top: 8px;">
					{{salaryPayRollDetail.workingAgeSubsidy}}
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">岗位工资</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.positionSalary}}
				</div>
				<label class="col-md-2 control-label">考勤</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.attendance}}
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">社保</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.socialSecurity}}
				</div>
				<label class="col-md-2 control-label">应发工资</label>
				<div class="col-md-4" style="padding-top: 8px;">
					{{salaryPayRollDetail.payableSalary}}
				</div>
			</div>
			<div class="form-group">
			<label class="col-md-2 control-label">提成</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="deduction" ng-model="salaryPayRollDetail.deduction" ng-change="detailGrid.changeValue()" required>
				</div>
				<label class="col-md-2 control-label">考勤扣款</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="attendanceDeductions" ng-model="salaryPayRollDetail.attendanceDeductions" ng-change="detailGrid.changeValue()" >
				</div>
			
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">所得税</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="tax" ng-model="salaryPayRollDetail.tax" ng-change="detailGrid.changeValue()" >
				</div>
				<label class="col-md-2 control-label">实发工资</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="paidSalary" ng-model="salaryPayRollDetail.paidSalary" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">工资定额参数</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="quotaJson" ng-model="salaryPayRollDetail.quotaJson" required>
				</div>
			</div>
			<!-- <div class="form-group">
				<label class="col-md-2 control-label">状态</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="status" ng-model="salaryPayRollDetail.status" required>
				</div>
			</div> -->
			<div class="form-group">
				<label class="col-md-2 control-label">备注</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="remark" ng-model="salaryPayRollDetail.remark" required>
				</div>
			</div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="detailGrid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" ng-click="detailGrid.save();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>

<div ed-modal="empQuotaDetailModal" data-options="title: '员工定额工资明细', static: true, width: 1120, defaultButton:false,onHidden:'reset'">
<form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="empQuotaDetailModalForm">
		<div class="portlet-body" style="height: 350px; overflow-y: auto">
			<table class="table table-striped table-bordered table-advance table-hover">
				<thead>
				<tr>
					<th>车牌号</th>
					<th>广告类型</th>
					<th>车型</th>
					<th>定额类型</th>
					<th>姓名</th>
					<th>定额</th>
					<th style="width:30%">工单明细详情</th>
				</tr>
				</thead>
				<tbody>
				<tr ng-repeat="empQuota in empQuotaList">
					<td>{{empQuota.busPlateNo}}</td>
					<td>{{empQuota.adName}}</td>
					<td>{{empQuota.busType}}</td>
					<td>{{empQuota.workBillItemType}}</td>
					<td>{{empQuota.empName}}</td>
					<td>{{empQuota.myQuota}}</td>
					<td>{{empQuota.empArray}}</td>
				</tr>
				</tbody>
			</table>
		</div>
	</form>
</div>

